package day06test;

import java.util.Random;

public class Test {
    public static void main(String[] args) {
        say();
        sayHi("Hello World");
        sayHello("Hello World",123);
        int num = getNum();
        System.out.println(num);
        plus("Hello World",123);
        int[] arr = testArray(5);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }

    public static void say() {
        System.out.println("Hello World");
    }

    public static void sayHi(String str) {
        System.out.println(str);
    }

    public static void sayHello(String str, int number) {
        System.out.println(str + number);
    }

    public static int getNum() {
        int number = 10;
        return number;
    }

    public static String plus(String str, int number) {
        String s1 = str + number;
        return s1;
    }

    public static int[] testArray(int len) {
        Random r = new Random();
        int[] result = new int[len];
        for (int i = 0; i < result.length; i++) {
            result[i] = r.nextInt(100) + 1;
        }
        return result;
    }
}
